Skip to main content link. Accesskey S
  • Help
  • HCL Logo
  • HCL Sametime wiki
  • THIS WIKI IS READ-ONLY. Individual names altered for privacy purposes.
  • HCL forums and blogs
  • Home
  • Product Documentation
  • Community Articles
  • Learning Center
Search
Community Articles > Integration with other products > How To Add Sametime Web Presence Awareness to Lotus Connections
  • Share Show Menu▼
  • Subscribe Show Menu▼

Recent articles by this author

Community articleHow To Add Sametime Web Presence Awareness to Lotus Connections
Added by ~Denise Destumichekakoi | Edited by IBM contributor~Keiko Ektumisonlen on July 26, 2010 | Version 4
expanded Abstract
collapsed Abstract
Instructions on how to use the Sametime Web API to add presence awareness to Lotus Connections 2.5.
Tags: sametime, lotus, connecitons, integration, awareness, presence, customization
I while ago I had shared instructions on how to enable STLinks in Lotus Connections. STLinks was a way to add instant messaging awareness to any web application by using pure JavaScript.

Lotus Connections is integrated out of the box with Lotus Sametime. This integration, however, requires that you have the Lotus Sametime client installed, configured, and running in order for the awareness to work. A customer was asking me the other day if we could enable awareness without requiring the Sametime client. The answer is yes.

With the latest Sametime 8.5+ version there's an AJAX API for awareness similar to STLinks. Here's how you can use that API to add awareness in Lotus Connections:

1. Enable SSO between Lotus Connections and Sametime

2. The first step is to initialize the API. Add the following code to header.html


<!-- Adding for Sametime Awareness - START -->
<link rel="stylesheet" type="text/css" href="http://stproxy.acme.com/stwebclient/dojo_1.2.3/sametime/themes/WebClientAll.css" />
<script type="text/javascript">
  // Settings for the proxy
  var stproxyConfig = {
          // Replace with the appropriate server & port
          server: "http://stproxy.acme.com",
          tokenLogin: true,          // We want to not display the login UI
          isConnectClient: false
     };
   
   // Commmented following line since djConfig is already initialized by Lotus Connections.
   // You will receive following error if you don't comment the following lines:
   //     djConfig.locale is undefined
   //     sap04/profiles/bundles/js/gzip_238210590/baseBundle.js
   //djConfig = {
   //      parseOnLoad: true
   //      //isDebug: true
   //};
</script>
<script type="text/javascript" src="http://stproxy.acme.com/stbaseapi/baseComps.js"></script>
<script type="text/javascript" src="http://stproxy.acme.com/stwebclient/dojo_1.2.3/sametime/livenameLight.js"></script>
<script type="text/javascript" src="http://stproxy.acme.com/stwebclient/widgets.js"></script>
<script type="text/javascript">
    // User ID and password
    //var userID = "userID";
    //var password = "password";
    // Logged in correctly
    function loggedInOK() {
            // You can do other actions now that you are logged in
    }
    function logout() {
             stproxy.login.logout();
    }


// Error callback
   function loginFailed(reason, error) {
              // Something has gone wrong: display some information
              alert("Error: " + reason + ": " + error);
   }
   // Log in anonymously
   function loginUser() {
             stproxy.login.loginByToken(null, stproxy.awareness.AVAILABLE, "I'm available", loggedInOK, loginFailed);
           return true;
   }

stproxy.addOnLoad(loginUser);


</script>


<!-- Adding for Sametime Awareness - END -->

3. Now add the following code anywhere in a page (for example, a blog or a wiki)


<div class="stmain tundra">
 <div dojoType="sametime.LiveName" userId="luisb@acme.com"></div>
</div>

4. An alternative is that you would like to add it as field in a user's Profile page. To do so, modify profiles-config.xml to add an attribute that looks like this:


Enjoy!
<attribute showLabel="false"

prependHtml="&lt;div class=&quot;stmain tundra&quot;&gt;&lt;div dojoType=&quot;sametime LiveName&quot; userId=&quot;"

appendHtml="&quot;&gt;&lt;/div&gt;&lt;/div&gt;">email</attribute>
expanded Attachments (0)
collapsed Attachments (0)
expanded Versions (5)
collapsed Versions (5)
Version Comparison     
VersionDateChanged by              Summary of changes
5Jul 26, 2010, 6:52:49 PM~Sanjay Dwoponegen  IBM contributor
This version (4)Jul 26, 2010, 6:46:46 PM~Keiko Ektumisonlen  IBM contributor
3Jul 26, 2010, 6:38:56 PM~Keiko Ektumisonlen  IBM contributor
2Jul 26, 2010, 6:31:42 PM~Keiko Ektumisonlen  IBM contributor
1Jul 26, 2010, 6:19:51 PM~Denise Destumichekakoi  IBM contributor
Copy and paste this wiki markup to link to this article from another article in this wiki.
Go ElsewhereStay ConnectedAbout
  • HCL Software
  • HCL Digital Solutions community
  • HCL Software Support
  • BlogsDigital Solutions blog
  • Community LinkHCL Software forums and blogs
  • About HCL Software
  • Privacy
  • Accessibility